package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.subscriptionfunc;
import com.ymttest.database.model.godmch.subscriptionfuncExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface subscriptionfuncMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=subscriptionfuncSqlProvider.class, method="countByExample")
    int countByExample(subscriptionfuncExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @DeleteProvider(type=subscriptionfuncSqlProvider.class, method="deleteByExample")
    int deleteByExample(subscriptionfuncExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Delete({
        "delete from subscriptionfunc",
        "where SubscriptionFuncId = #{subscriptionFuncId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer subscriptionFuncId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Insert({
        "insert into subscriptionfunc (SubscriptionFuncId, MchId, ",
        "FuncType, IsTryout, ",
        "TryoutExpirationTime, SubscriptionStatus, ",
        "SubscriptionExpirationTime, FuncPackageId, ",
        "CreateTime, UpdateTime, ",
        "SubscriptionChargeId)",
        "values (#{subscriptionFuncId,jdbcType=INTEGER}, #{mchId,jdbcType=INTEGER}, ",
        "#{funcType,jdbcType=INTEGER}, #{isTryout,jdbcType=BIT}, ",
        "#{tryoutExpirationTime,jdbcType=TIMESTAMP}, #{subscriptionStatus,jdbcType=INTEGER}, ",
        "#{subscriptionExpirationTime,jdbcType=TIMESTAMP}, #{funcPackageId,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{subscriptionChargeId,jdbcType=VARCHAR})"
    })
    int insert(subscriptionfunc record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @InsertProvider(type=subscriptionfuncSqlProvider.class, method="insertSelective")
    int insertSelective(subscriptionfunc record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=subscriptionfuncSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SubscriptionFuncId", property="subscriptionFuncId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="IsTryout", property="isTryout", jdbcType=JdbcType.BIT),
        @Result(column="TryoutExpirationTime", property="tryoutExpirationTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="SubscriptionStatus", property="subscriptionStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="SubscriptionExpirationTime", property="subscriptionExpirationTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="SubscriptionChargeId", property="subscriptionChargeId", jdbcType=JdbcType.VARCHAR)
    })
    List<subscriptionfunc> selectByExample(subscriptionfuncExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Select({
        "select",
        "SubscriptionFuncId, MchId, FuncType, IsTryout, TryoutExpirationTime, SubscriptionStatus, ",
        "SubscriptionExpirationTime, FuncPackageId, CreateTime, UpdateTime, SubscriptionChargeId",
        "from subscriptionfunc",
        "where SubscriptionFuncId = #{subscriptionFuncId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="SubscriptionFuncId", property="subscriptionFuncId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="MchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="IsTryout", property="isTryout", jdbcType=JdbcType.BIT),
        @Result(column="TryoutExpirationTime", property="tryoutExpirationTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="SubscriptionStatus", property="subscriptionStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="SubscriptionExpirationTime", property="subscriptionExpirationTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="SubscriptionChargeId", property="subscriptionChargeId", jdbcType=JdbcType.VARCHAR)
    })
    subscriptionfunc selectByPrimaryKey(Integer subscriptionFuncId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionfuncSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") subscriptionfunc record, @Param("example") subscriptionfuncExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionfuncSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") subscriptionfunc record, @Param("example") subscriptionfuncExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=subscriptionfuncSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(subscriptionfunc record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table subscriptionfunc
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Update({
        "update subscriptionfunc",
        "set MchId = #{mchId,jdbcType=INTEGER},",
          "FuncType = #{funcType,jdbcType=INTEGER},",
          "IsTryout = #{isTryout,jdbcType=BIT},",
          "TryoutExpirationTime = #{tryoutExpirationTime,jdbcType=TIMESTAMP},",
          "SubscriptionStatus = #{subscriptionStatus,jdbcType=INTEGER},",
          "SubscriptionExpirationTime = #{subscriptionExpirationTime,jdbcType=TIMESTAMP},",
          "FuncPackageId = #{funcPackageId,jdbcType=INTEGER},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP},",
          "SubscriptionChargeId = #{subscriptionChargeId,jdbcType=VARCHAR}",
        "where SubscriptionFuncId = #{subscriptionFuncId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(subscriptionfunc record);
}